<template>
    <div id="coming">
        <ul>
            <li v-for="item in comingPlayData" :key="item.id">
                <div class="first">
                    <img :src="item.pic" alt="">
                </div>
                <div class="second">
                    <p class="title">{{ item.name }}</p>
                    <p><span class="font-color">{{ item.wish }}</span><span class="font-color">人想看</span></p>
                    <p class="actors font-color">{{ item.actors }}</p>
                    <p class="font-color">未来30天内上映</p>
                </div>
                <div class="third">
                    <button>预售</button>
                </div>
            </li>
        </ul>
    </div>
</template>

<script>
    export default {
        name:'Now',
        data(){
            return{
                comingPlayData:[]
            }
        },
        created(){
            this.getcomingPlayData()
        },
        methods:{
            getcomingPlayData(){
            var that=this
                axios.get('/mock/comingPlayData.json')
                .then(function (response) {
    console.log(response);
    if(response.data &&response.data.cinemaList){
      that.comingPlayData=response.data.cinemaList
    }
  })
  .catch(function (error) {
    console.log(error);
  })
            }
        }
    }
</script>
<style scoped>
#coming{
    width: 100%;
    padding-bottom: 42px;
}
img{
    width: 80px;
}
div{
    float: left;
}
.first{
    width: 25%;
    margin-bottom: 8px;
}
.second{
    width: 58%;
}
.actors{
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.third{
    width: 15%;
    text-align: center;
    line-height: 75px;
}
li{
    overflow: hidden;
    padding: 10px;
    border-bottom: 1px solid #ccc;
}
.title{
    font-size: 18px;
    font-weight: bold;
}
.font-color{
    color: #666;
}
.score{
    color: #f90;
    margin-left:5px;
    font-weight: bold;

}
button{
        background-color: skyblue;
        width: 45px;
        height: 30px;
        border: none;
        color: #fff;
        border-radius: 5px;
}
</style>